package lambda;

/**
 * @program: baseModule
 * @description:
 * @author: zhanghz001
 * @create: 2020-10-22 17:46
 **/
public class EatableDemo {
    static void useEatable(Eatable e) {
        e.eat();
    }

    public static void main(String[] args) {
        useEatable(new Eatable() {
            @Override
            public void eat() {
                System.out.println("eat");
            }
        });
        useEatable(() -> System.out.println("eat"));
    }
}
